﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using BiffenModel;
using System.Runtime.Serialization;


namespace BiffenServiceLibary
{
    
    public interface IBiffenDal
    {
        
        void OpenConnection(string connectionString);
        void CloseConnection();

        #region Person
        int InsertPerson(string fname, string lname, string street, string streetNo, int zipCode, string phone, string email);
        void InsertCustomer(string fname, string lname, string street, string streetNo, int zipCode, string phone, DateTime birthDate, string email);
        void InsertEmployee(string fname, string lname, string street, string streetNo, int zipCode, string phone, string userName, string password, string email);
        void DeleteCustomer(int cusId, int persId);
        void DeleteEmployee(int empId,int persId);
        void EditCustomer(int id, string fname, string lname, string street, string streetNo, int zipCode, string phone, DateTime birthDate, string email);
        void EditEmployee(int id, string fname, string lname, string street, string streetNo, int zipCode, string phone, string userName, string password, string email);
        int GetPersonIdFromEmpID(int empId);
        int GetPersonIdFromCusID(int cusId);
        int GetPersonIdFromCusPhone(string phone);
        int GetMaxPersonId();

        List<Customer> AllCustomers();
        List<Employee> AllEmployee();
        Customer GetOneCustomer(int id);
        Employee GetOneEmployee(int empId);
        Employee GetEmployeeUserName(string userName);
        #endregion

        #region Movie
        int InsertMovie(string title, string director, string description, string genre, string timeLength, string picture);
        void addArtistsToMovie(int movieID, List<string> artists);
        void EditMovie(int id, string name, string playTime, string instructor, string movieInfo);
        List<Movie> AllStateMovies(bool state);
        List<Movie> AllMovies();
        void setMovieState(int movID, bool state);
        int getShowIdFromMovieID(int movID);
        Movie getOneMovie(int movID);

        #endregion

        #region CinemaHall
        void NewCinemaHall(int showID);
        CinemaHall GetOneCinemaHall(int cinemaID);
        void DeleteCinemaHall(int cinemaID);
        void UpdateCinemaHall(int cinemaID, int showID);
        List<CinemaHall> AllCinemas();
        #endregion

        #region Show
        void NewShow(DateTime date, int movID);
        Show GetOneShow(int showID);
        void DeleteShow(int showID);
        void UpdateShow(int showID, DateTime date, int movieID);
        List<Show> AllShows();
        #endregion

        #region Booking
        void NewBooking(DateTime date, int cinID, int showID, int perID, int seatNo);
        Booking GetOneBooking(int bookID);
        void DeleteBooking(int bookID);
        void UpdateBooking(int bookID, DateTime date, int cinID, int showID, int perID, int seatNo);
        List<Booking> AllBookings();
        #endregion
    }
}
